﻿#ifndef CMODBUSUNITREGISTER_H
#define CMODBUSUNITREGISTER_H

#include "cmodbusunitbase.h"

class CModbusUnitRegister : public CModbusUnitBase
{
    Q_OBJECT
public:

    int datalen;
    int datatype;

    explicit CModbusUnitRegister(ESigType maptype, QObject *parent = nullptr);

signals:
public:
    virtual QString getFieldNameByCol(int col)override;

    virtual QVariant getFieldValueByFielddName(const QString& name)override;

    virtual void setFieldValueByCol(int col, const QVariant& value)override;

    virtual QJsonObject toJson()override;

    virtual void fromJson(const QJsonObject &obj)override;

    virtual QSharedPointer<IModel> createEmpty()override;

    virtual bool sync(bool dir = true)override{}

    virtual void changeBgColor(bool ischange);

    virtual bool checkData();

    virtual void deleteReset();
};

#endif // CMODBUSUNITREGISTER_H
